🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / repository / src / commonMain / kotlin / org / meshtastic / core / repository / ServiceStateWriter.kt
Displaying Raw • Download
core/repository/src/commonMain/kotlin/org/meshtastic/core/repository/ServiceStateWriter.kt bf929c20f274232e0eb8ddc19b2dc82403e99e5b (bf929c20) Text, 2.29 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.repository
Tff7b72import T7ee787co.touchlab.kermit.Severity
Tff7b72import T7ee787org.meshtastic.core.model.ConnectionState
Tff7b72import T7ee787org.meshtastic.core.model.service.TracerouteResponse
Tff7b72import T7ee787org.meshtastic.proto.ClientNotification
Tff7b72import T7ee787org.meshtastic.proto.MeshPacket
T8b949e/**
* Write-side interface for service state mutations.
*
* Only background handlers, managers, and the service layer should inject this interface. UI/ViewModel code should
* never write service state directly — it observes via [ConnectionStateProvider], [TracerouteResponseProvider], or
* [NeighborInfoResponseProvider].
*/
Tff7b72interface T56d364ServiceStateWriter Tb4b4b4{
T8b949e/** Updates the canonical app-level connection state. Only [MeshConnectionManager] should call this. */
Tff7b72fun Td2a8ffsetConnectionStateTb4b4b4(Te6edf3connectionStateTb4b4b4: Te6edf3ConnectionStateTb4b4b4)
T8b949e/** Sets the current client notification. */
Tff7b72fun Td2a8ffsetClientNotificationTb4b4b4(Te6edf3notificationTb4b4b4: Te6edf3ClientNotification?Tb4b4b4)
T8b949e/** Clears the current client notification. */
Tff7b72fun Td2a8ffclearClientNotificationTb4b4b4(Tb4b4b4)
T8b949e/** Sets an error message to be displayed. */
Tff7b72fun Td2a8ffsetErrorMessageTb4b4b4(Te6edf3textTb4b4b4: Tffa657StringTb4b4b4, Te6edf3severityTb4b4b4: Te6edf3Severity Tff7b72= Te6edf3SeverityTb4b4b4.Te6edf3ErrorTb4b4b4)
T8b949e/** Clears the current error message. */
Tff7b72fun Td2a8ffclearErrorMessageTb4b4b4(Tb4b4b4)
T8b949e/** Sets the connection progress message. */
Tff7b72fun Td2a8ffsetConnectionProgressTb4b4b4(Te6edf3textTb4b4b4: Tffa657StringTb4b4b4)
T8b949e/** Emits a mesh packet into the shared flow. */
Tff7b72suspend Tff7b72fun Td2a8ffemitMeshPacketTb4b4b4(Te6edf3packetTb4b4b4: Te6edf3MeshPacketTb4b4b4)
T8b949e/** Sets the traceroute response. */
Tff7b72fun Td2a8ffsetTracerouteResponseTb4b4b4(Te6edf3valueTb4b4b4: Te6edf3TracerouteResponse?Tb4b4b4)
T8b949e/** Sets the neighbor info response. */
Tff7b72fun Td2a8ffsetNeighborInfoResponseTb4b4b4(Te6edf3valueTb4b4b4: Tffa657String?Tb4b4b4)
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s